<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.validation.min.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/admincp.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.tooltip.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.cookie.js"></script>
<link href="{HEJIN_PATH}public/admin/css/skin_0.css" rel="stylesheet" type="text/css" id="cssfile2" />
<link href="{HEJIN_PATH}public/admin/css/style.css" rel="stylesheet" type="text/css"/>


<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
<div class="h3" style="width:auto">{lang hejin_box:addreply}</div>
      <ul class="tab-base">
        <li><a href="admin.php?action=plugins&operation=config&do={$_GET['do']}&identifier=hejin_box&pmod=reply&model=img" class="current"><span>{lang hejin_box:reply}</span></a></li>
      </ul>
    </div>
  </div>
  <form id="add_form" method="post" action="">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
    <input type="hidden" name="id" value="$id" />
    <table class="table tb-type2">
      <tbody>
        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_title">{lang hejin_box:caidanmc}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="<!--{eval echo stripslashes($dhinfo['title']);}-->" name="title" id="class_title" class="txt"></td>
          <td class="vatop tips">{if $sid}{lang hejin_box:zicdmcts}{else}{lang hejin_box:zcdmcts}{/if}</td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_type">{lang hejin_box:caidanlx}</label></td>
        </tr>
		<tr class="noborder">
          <td class="vatop rowform"><select id="class_type" name="type">
              <option value="1"{if $dhinfo['type']==1} selected="selected"{/if}>{lang hejin_box:caidanlxa}</option>
              <option value="2"{if $dhinfo['type']==2} selected="selected"{/if}>{lang hejin_box:caidanlxb}</option>
              <option value="3"{if $dhinfo['type']==3} selected="selected"{/if}>{lang hejin_box:caidanlxc}</option>
              <option value="4"{if $dhinfo['type']==4} selected="selected"{/if}>{lang hejin_box:caidanlxd}</option>
              <option value="5"{if $dhinfo['type']==5} selected="selected"{/if}>{lang hejin_box:caidanlxe}</option>
            </select></td>
          <td class="vatop tips"></td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_content">{lang hejin_box:caidanr}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="<!--{eval echo stripslashes($dhinfo['content']);}-->" name="content" id="class_content" class="txt"></td>
          <td class="vatop tips">{lang hejin_box:caidanrts}</td>
        </tr>
         <tr>
          <td colspan="2" class="required"><label class="validation" for="status">{lang hejin_box:paixu}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="status" name="status" type="text" class="txt" value="$dhinfo['status']" /></td>
          <td class="vatop tips"></td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"><input name="edit_button" class="btn" type="submit" value="{lang hejin_box:baocun}" /></td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
$(document).ready(function(){




    $("#submit").click(function(){
        $("#add_form").submit();
    });

    $("input[nc_type='microshop_goods_class_image']").live("change", function(){
		var src = getFullPath($(this)[0]);
		$(this).parent().prev().find('.low_source').attr('src',src);
		$(this).parent().find('input[class="type-file-text"]').val($(this).val());
	});


    $('#add_form').validate({
        errorPlacement: function(error, element){
            error.appendTo(element.parent().parent().prev().find('td:first'));
        },
        success: function(label){
            label.addClass('valid');
        },
        rules : {
            title: {
                required : true,
                maxlength : 40
            },
            content: {
                required : true,
                maxlength : 256
            },
            status: {
                required : true,
                digits: true,
			 },
        },
        messages : {
            title: {
                required : "{lang hejin_box:addmsga}",
                maxlength : jQuery.validator.format("{lang hejin_box:addmsgb}40{lang hejin_box:addmsgc}")
            },
            content: {
                required : "{lang hejin_box:addmsga}",
                maxlength : jQuery.validator.format("{lang hejin_box:addmsgb}256{lang hejin_box:addmsgc}")
            },
            status: {
                required : "{lang hejin_box:addmsga}",
				digits: "{lang hejin_box:addmsgd}",
			},
        }
    });
});
</script> 
